//
//  UIView+LEBezierPath.m
//  LiveEducation
//
//  Created by Liu,Qingcan on 2017/4/12.
//  Copyright © 2017年 Baidu. All rights reserved.
//

#import "UIView+LEBezierPath.h"

@implementation UIView (LEBezierPath)

- (void)makeViewCircle{
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:self.bounds.size];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init];
    maskLayer.frame = self.bounds;
    maskLayer.path = maskPath.CGPath;
    self.layer.mask = maskLayer;

    
}


- (void)makeViewLittleCircle:(CGFloat)radius{
    CGSize size = CGSizeMake(radius, radius);
    UIBezierPath *maskpath = [UIBezierPath bezierPathWithRoundedRect:self.bounds
                                                   byRoundingCorners:UIRectCornerAllCorners             cornerRadii:size];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init];
    maskLayer.frame = self.bounds;
    maskLayer.path = maskpath.CGPath;
    self.layer.mask = maskLayer;
    
}

@end
